{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "plot_x = np.linspace(-1, 6, 141)\n",
    "plot_y = (plot_x - 2.5) ** 2 -1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3deVyVZd7H8c+PHRRQZBFkVXBX1Mi90rQstZyapmxxqmmbmpbpaeppmn2reWamZ9qbaXfKtDQrK1vNyswNNVdQAdkREBWQ/Ryu5w9wHsdc4cB97nN+79eLl0B07m9IXy+v+7quW4wxKKWUsh8fqwMopZTqGC1wpZSyKS1wpZSyKS1wpZSyKS1wpZSyKb/uvFhkZKRJTk7uzksqpZTtbdy4cb8xJurYz3drgScnJ5OZmdmdl1RKKdsTkYLjfV6nUJRSyqa0wJVSyqa0wJVSyqa0wJVSyqa0wJVSyqa0wJVSyqa0wJVSyqZsUeAfbC1jwbrjLoNUSim3VnKogT9/mE1FbaPLX9sWBb58Wxl/+3gXTQ6n1VGUUuqMvLGhiH9+lUuzo9Xlr22LAr/q7AQO1rfw8Y5yq6MopdRpc7YaFmcWcU5aFPG9Q1z++rYo8MmpkcT3DuaNDYVWR1FKqdP21e5KyqobufrshC55fVsUuI+PcFVGAqtzqiioqrM6jlJKnZaF6wuJ7BnAtCExXfL6tihwgCsy4vGRtvkkpZRydxU1jazIruD7Y+IJ8OuaqrVNgceGBzN1UDSLNxbjcLr+Zo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2dT/AVD0ZJtHFzaDAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(plot_x, plot_y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "def dJ(theta):\n",
    "    return 2*(theta - 2.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def J(theta):\n",
    "    return (theta-2.5) ** 2 -1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2.499891109642585\n",
      "-0.99999998814289\n"
     ]
    }
   ],
   "source": [
    "eta = 0.1\n",
    "epsilon = 1e-8\n",
    "\n",
    "theta = 0\n",
    "while True:\n",
    "    gradient = dJ(theta)\n",
    "    last_theta = theta\n",
    "    theta = theta - eta * gradient\n",
    "    if (abs(J(theta) - J(last_theta)) < epsilon):\n",
    "        break\n",
    "        \n",
    "print (theta)\n",
    "print (J(theta))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "eta = 0.1\n",
    "epsilon = 1e-8\n",
    "\n",
    "theta = 0\n",
    "theta_history = [theta]\n",
    "while True:\n",
    "    gradient = dJ(theta)\n",
    "    last_theta = theta\n",
    "    theta = theta - eta * gradient\n",
    "    theta_history.append(theta)\n",
    "    if (abs(J(theta) - J(last_theta)) < epsilon):\n",
    "        break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29m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OdtV7O6rAgQ3A5cBC20GORUR8gZeA84EewAQR6WE31Qm9DYy1HeIU1QIPGmO6A4OAe9z8c1sFjDTGpAB9gLEiMshyppO5H0i3HeI0nGOM6eOAa8GfA74wxnQDUnDh59hRBW6MSTfGZNjOcQIDgG3GmExjTDUwA7jEcqbjMsYsBPbYznEqjDE7jTGrD39cxqF/BHF2Ux2fOeTA4Yf+h3+57RUDIhIPXAhMtZ3Fk4hIGDAceAPAGFNtjNnnqvd3VIE7QByQe8TjPNy4ZJxKRBKBvsAPdpOc2OEpibXALuBrY4w7530WeBiotx3kFBngKxFZJSK32w5zAh2BYuCtw9NTU0Wkhave3O0KXES+EZENx/jltiPZIxxry3K3HXU5kYi0BP4DPGCMKbWd50SMMXXGmD5APDBARHrZznQsIjIO2GWMWWU7y2kYaozpx6HpyntEZLjtQMfhB/QDXjHG9AXKAZedG3O7XemNMaNtZ2iEPCDhiMfxQIGlLB5HRPw5VN7TjTFzbOc5VcaYfSLyHYfON7jjCeOhwMUicgEQBISJyDRjzPWWcx2XMabg8O+7ROS/HJq+dMdzY3lA3hE/fc3GhQXudiNwh1sJdBaRJBEJAMYDcy1n8ggiIhyaR0w3xvzLdp6TEZFIEWl1+ONgYDSw2W6qYzPGPGKMiTfGJHLoa/Zbdy5vEWkhIqE/fQych3t+Y8QYUwjkikjXw0+NAja56v0dVeAicpmI5AGDgc9E5EvbmY5kjKkF7gW+5NBJtg+NMRvtpjo+EfkAWAZ0FZE8EbnVdqYTGArcAIw8fOnY2sMjRncVAywQkR859I39a2OM21+e5xDRwGIRWQesAD4zxnxhOdOJ3AdMP/y10Ad4wlVvrLfSK6WUQzlqBK6UUur/aIErpZRDaYErpZRDaYErpZRDaYErpZRDaYErpZRDaYErpZRD/X/S8keemsZ0SwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(plot_x, J(plot_x))\n",
    "plt.plot(np.array(theta_history), J(np.array(theta_history)), color='r')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "46"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(theta_history)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "def gradient_descent(initial_theta, eta, epsilon=1e-8):\n",
    "    theta = initial_theta\n",
    "    theta_history = [theta]\n",
    "    while True:\n",
    "        gradient = dJ(theta)\n",
    "        last_theta = theta\n",
    "        theta = theta - eta * gradient\n",
    "        theta_history.append(theta)\n",
    "        #print (theta)\n",
    "        if (abs(J(theta) - J(last_theta)) < epsilon):\n",
    "            break\n",
    "    return theta_history\n",
    "        \n",
    "def plot_theta_history():\n",
    "    plt.plot(plot_x, J(plot_x))\n",
    "    plt.plot(np.array(theta_history), J(np.array(theta_history)), color='r')\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3deVyVZd7H8c/FDrK5AAIioLjhrohrtqhZadmelpYt2rTXtEwzzzQ1y1MzNTXtTVpak6am45RTtprligruiis7KCAqIMhyzrmeP6R5HHOFA9e5z/m9Xy9fwonO/R1ivl7e97UorTVCCCGsx8t0ACGEEI0jBS6EEBYlBS6EEBYlBS6EEBYlBS6EEBbl05IXa9eunU5ISGjJSwohhOVlZGQc0lpHnPp6ixZ4QkIC6enpL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y3GVHXVaklAoG/gk8qrWuMJ3nbLTWdq11P6ADkKqU6mU60+kopcYDJVrrDNNZLsBwrfUATtyufEApNdJ0oDPwAQYA72it+wNVgNOejbncqfRa69GmMzRBARB30ucdgCJDWdyOUsqXE+U9V2u92HSe86W1PqqU+oETzxtc8YHxcOAapdRVQAAQqpSao7WebDjXGWmtixp+L1FK/YsTty9d8dlYAVBw0t++FuHEAne5EbjFbQC6KKUSlVJ+wERgieFMbkEppThxHzFTa/2K6TznopSKUEqFN3wcCIwGdplNdXpa619rrTtorRM48TP7vSuXt1KqlVIq5KePgctxzT8Y0VofBPKVUt0aXhoF7HTW+1uqwJVS1ymlCoChwBdKqa9NZzqZ1toGPAh8zYmHbJ9orXeYTXVmSql5wFqgm1KqQCl1t+lMZzEcmAJc1jB1bHPDiNFVRQPLlVJbOfEH+7daa5efnmcRUcAqpdQWYD3whdb6K8OZzuYhYG7Dz0I/4HlnvbEspRdCCIuy1AhcCCHE/5MCF0IIi5ICF0IIi5ICF0IIi5ICF0IIi5ICF0IIi5ICF0IIi/o/aThNK3MfNH8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "eta = 0.01\n",
    "theta_history = gradient_descent(0., eta)\n",
    "plot_theta_history()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3deXxU1f3/8dfJnkAStiRkARIgLGEJYNgRRUBEUdxFRAUXXHChdan229Z+bb+1rbZV0aogI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AreASCDrjMfZOHHJWJVSKhroD2wxm6R+dVMSO4EC4FuttTPnfRV4Fqg1HeQiaeAbpVSSUmq66TD16AwUAvPrpqfeVUq1cNSbO12BK6W+U0rtPccvpx3JnuFcW5Y77ajLipRSLYGPgJla6xLTeeqjtbZrrfsBUcAgpVT9uyobopSaABRorZNMZ7kEw7XWAzg9XTlDKTXSdKDz8AIGAG9prfsDZYDDzo053a70WusxpjM0QjbQ4YzHUUCOoSwuRynlzenyXqS1XmE6z8XSWp9USn3P6fMNznjCeDhwg1LqWsAPCFJKLdRaTzGc67y01jl1HwuUUh9zevrSGc+NZQPZZ/zvazkOLHCnG4Fb3DYgVikVo5TyASYBKw1ncglKKcXpecRkrfU/Tee5EKVUiFKqVd3n/sAY4IDZVOemtX5eax2ltY7m9PfsGmcub6VUC6VU4E+fA1fjnD8Y0VrnAVlKqe51T40G9jvq/S1V4Eqpm5RS2cBQ4Aul1CrTmc6ktbYBjwGrOH2S7UOt9T6zqc5PKbUY2AR0V0plK6XuN52pHsOBu4Gr6i4d21k3YnRW4cBapdRuTv9g/1Zr7fSX51lEGPCjUmoXsBX4Qmv9teFM9XkcWFT3vdAP+Iuj3lhupRdCCIuy1AhcCCHE/ycFLoQQFiUFLoQQFiUFLoQQFiUFLoQQFiUFLoQQFiUFLoQQFvX/AHivRfXrjiflAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "eta = 0.001\n",
    "theta_history = gradient_descent(0., eta)\n",
    "plot_theta_history()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3682"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(theta_history)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
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AhhLAoKeBCCGFRUsCFEMKipIALIYRFSQEXQgiLkgIuhBAW9f9oFetRZ/p7HAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "eta = 0.8\n",
    "theta_history = gradient_descent(0., eta)\n",
    "plot_theta_history()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "ename": "OverflowError",
     "evalue": "(34, 'Result too large')",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mOverflowError\u001b[0m                             Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-44-8d2b261cf775>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[0meta\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m1.1\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mtheta_history\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mgradient_descent\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m0.\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0meta\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      3\u001b[0m \u001b[0mplot_theta_history\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m<ipython-input-38-157eaaac7df2>\u001b[0m in \u001b[0;36mgradient_descent\u001b[1;34m(initial_theta, eta, epsilon)\u001b[0m\n\u001b[0;32m      8\u001b[0m         \u001b[0mtheta_history\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtheta\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      9\u001b[0m         \u001b[1;31m#print (theta)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 10\u001b[1;33m         \u001b[1;32mif\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mabs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mJ\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtheta\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m-\u001b[0m \u001b[0mJ\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlast_theta\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m<\u001b[0m \u001b[0mepsilon\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     11\u001b[0m             \u001b[1;32mbreak\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     12\u001b[0m     \u001b[1;32mreturn\u001b[0m \u001b[0mtheta_history\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m<ipython-input-9-6197ca3fe6e9>\u001b[0m in \u001b[0;36mJ\u001b[1;34m(theta)\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mJ\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtheta\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m     \u001b[1;32mreturn\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mtheta\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m2.5\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m**\u001b[0m \u001b[1;36m2\u001b[0m \u001b[1;33m-\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mOverflowError\u001b[0m: (34, 'Result too large')"
     ]
    }
   ],
   "source": [
    "eta = 1.1\n",
    "theta_history = gradient_descent(0., eta)\n",
    "plot_theta_history()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "def J(theta):\n",
    "    try:\n",
    "        return (theta-2.5) ** 2 -1\n",
    "    except:\n",
    "        return float('inf')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-46-8d2b261cf775>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[0meta\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m1.1\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mtheta_history\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mgradient_descent\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m0.\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0meta\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      3\u001b[0m \u001b[0mplot_theta_history\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m<ipython-input-38-157eaaac7df2>\u001b[0m in \u001b[0;36mgradient_descent\u001b[1;34m(initial_theta, eta, epsilon)\u001b[0m\n\u001b[0;32m      8\u001b[0m         \u001b[0mtheta_history\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtheta\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      9\u001b[0m         \u001b[1;31m#print (theta)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 10\u001b[1;33m         \u001b[1;32mif\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mabs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mJ\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtheta\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m-\u001b[0m \u001b[0mJ\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlast_theta\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m<\u001b[0m \u001b[0mepsilon\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     11\u001b[0m             \u001b[1;32mbreak\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     12\u001b[0m     \u001b[1;32mreturn\u001b[0m \u001b[0mtheta_history\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mKeyboardInterrupt\u001b[0m: "
     ]
    }
   ],
   "source": [
    "eta = 1.1\n",
    "theta_history = gradient_descent(0., eta)\n",
    "plot_theta_history()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [],
   "source": [
    "def gradient_descent(initial_theta, eta, n_iters = 10, epsilon=1e-8):\n",
    "    theta = initial_theta\n",
    "    theta_history = [theta]\n",
    "    i_iter = 0\n",
    "    while i_iter < n_iters:\n",
    "        gradient = dJ(theta)\n",
    "        last_theta = theta\n",
    "        theta = theta - eta * gradient\n",
    "        theta_history.append(theta)\n",
    "        print (theta)\n",
    "        if (abs(J(theta) - J(last_theta)) < epsilon):\n",
    "            break\n",
    "        i_iter += 1\n",
    "    return theta_history"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5.5\n",
      "-1.1000000000000005\n",
      "6.820000000000001\n",
      "-2.684000000000002\n",
      "8.720800000000004\n",
      "-4.964960000000007\n",
      "11.457952000000008\n",
      "-8.249542400000012\n",
      "15.399450880000016\n",
      "-12.979341056000022\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3deXBd5Z3m8e9PsnbJWixZlrV4N7aMwdhiJ2AIITSEJglNQpJK0wmBTHXoma7qqknSPVWdmq7U0FnoooeeVJzpVKC7EyAdSEggLE1CmEBYbGMW7zbe5F1eJS9a3/njvafvqqv9rs+n6tS9Oudc6b2W9Zxzf+c972vOOUREJLcUpLsBIiIy+RTuIiI5SOEuIpKDFO4iIjlI4S4ikoMU7iIiOWjEcDezVjP7rZltNrONZvbfQuu/YWb7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EV/Uwr3cXLObXbObU2w6XbgMedcr3NuF7ADuCy1rZMYlwE7nHMfOOf6gMfwvyfJEM65V4DjMatvBx4JPX8E+HhKGzVBw7ynlFG4T75mYF/E152hddnqfjN7N/QRM6s+FkfItd9JJAe8YGbrQpPO55JG59xBgNDjzDS3Z7Kk5G9K4Z6Emf2Hmb2fYEl21mcJ1mVsl6QR3uP3gAXACuAg8N20Nnb8sup3MkZXO+dW4ktOXzGza9PdIEkqZX9TUzbNXi5wzt04jpd1Aq0RX7cAByanRZNvtO/RzH4A/GqKmzNVsup3MhbOuQOhxyNm9hS+BPVK8ldljcNm1uScO2hmTcCRdDdoopxzh4PnU/03pTP3yfc0cJeZlZjZPGAR8Gaa2zQuoT+owCfwF5Gz0VvAIjObZ2bF+AveT6e5TRNmZhVmVhU8B24ie39HiTwN3B16fjfwizS2ZVKk8m9KZ+7jZGafAP430AA8Y2YbnHMfdc5tNLMngE3AAPAV59xgOts6Ad8ysxX4EsZu4Mvpbc74OOcGzOx+4HmgEPihc25jmps1GRqBp8wM/N/yj51zz6W3SeNjZj8BVgP1ZtYJ/C3wAPCEmd0D7AXuTF8Lx26Y97Q6VX9TukNVRCQHqSwjIpKDFO4iIjlI4S4ikoMU7iIiOUjhLiKSgxTuIiI5SOEuIpKDFO4iIjno/wODI3hduM47CAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "eta = 1.1\n",
    "theta_history = gradient_descent(0., eta)\n",
    "plot_theta_history()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
